Monitoring the position of a piston which is provided with a magnet using a reed contact which can be influenced by the magnet is known. This is often achieved with magnetic rings around the piston and one or two reed switches which act in parallel on the cylinder. The cylinder consists of nonmagnetic material for this purpose.
These reed contacts can moreover be caused to close by magnets attached from the outside when they should be open due to the position of the cylinder. This should be avoided for safety reasons. Moreover unintended movement of the sensor along the axis of motion of the cylinder should be prevented to allow calibration of the position of the sensor.